package com.x.epspace.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Field;
import org.mongodb.morphia.annotations.Index;
import org.mongodb.morphia.annotations.IndexOptions;
import org.mongodb.morphia.annotations.Indexes;
import org.mongodb.morphia.annotations.Reference;
import org.mongodb.morphia.utils.IndexType;

/**
 * 用户操作日志
 * @author xiajiangge
 *
 */
@Entity("operlog")
@JsonSerialize(include=JsonSerialize.Inclusion.NON_EMPTY)
@Indexes( 
		{
			@Index(fields={@Field("regUser"),@Field("bindEnt"),@Field(value="operTime",type=IndexType.DESC)})
		}
) 
public class OperLog extends BaseEntity implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 3277581705664391707L;

	@Reference(lazy=true)
	private RegUser regUser;
	
	@Reference(lazy=true)
	private BindEnt bindEnt;
	
	private String operCode;
	
	private Map<String,Object> operContent;
	
	private long operTime;
	
	private String remoteIp;
	
	private String operDate;

	public RegUser getRegUser() {
		return regUser;
	}

	public void setRegUser(RegUser regUser) {
		this.regUser = regUser;
	}

	public BindEnt getBindEnt() {
		return bindEnt;
	}

	public void setBindEnt(BindEnt bindEnt) {
		this.bindEnt = bindEnt;
	}

	public String getOperCode() {
		return operCode;
	}

	public void setOperCode(String operCode) {
		this.operCode = operCode;
	}

	public Map<String, Object> getOperContent() {
		return operContent;
	}

	public void setOperContent(Map<String, Object> operContent) {
		this.operContent = operContent;
	}

	public long getOperTime() {
		return operTime;
	}

	public void setOperTime(long operTime) {
		this.operTime = operTime;
	}

	public String getRemoteIp() {
		return remoteIp;
	}

	public void setRemoteIp(String remoteIp) {
		this.remoteIp = remoteIp;
	}

	public String getOperDate() {
		return operDate;
	}

	public void setOperDate(String operDate) {
		this.operDate = operDate;
	}

	
}
